/*
	This file is part of Sandbox.

	Copyright (C) 2008  Frederic-Gerald Morcos <fred.morcos@gmail.com>

	Sandbox is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Sandbox is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License 
	along with Sandbox.  If not, see <http://www.gnu.org/licenses/>.
*/

#import "point.h"
#import "node-properties.h"
#import <cairo.h>

/**
* An interface for the Node class. An interface for the Node class, it inherites 
* from the Point class. It has as public instances the "mass" of type integer. 
* It has as private instances the "netwfore" and "velocity" of type Point 
* pointer, the "width" and "height" of type integer, the "locked and "selected" 
* of type boolean and the "properties" of type Prperties pointer.
*
* @author Frederic-Gerald Morcos
*/

@interface Node : Point {
@public
	int mass;
	//BOOL selected;
@protected
	Point *netforce;
	Point *velocity;
	int width, height;
	BOOL locked, selected;
	Properties *properties;
}

- init;
- free;

/**
* A method to expose the Nodes. A method to expose the Nodes created using Cairo. 
* @param context a cairo_t context 
*
*@author Andrew Botros Boktor
*@author Frederic-Gerald Morcos
*@author Marleine Daoud
*/

- expose: (cairo_t *) context;
- (int) width;
- (int) height;
- width: (int) val;
- height: (int) val;
- netforce: (Point *) val;
- (Point *) netforce;
- velocity: (Point *) val;
- (Point *) velocity;
- lock;
- unlock;
- (BOOL) locked;
- (BOOL) selected;
- select;
- unselect;

/**
* A method to get the NodeType. A method to get the NodeType from the node's 
* properties.
* @return NodeType of the node. 
*
*@author Marleine Daoud
*/

- (NodeType) type;

/**
* A method to set the NodeType. A method to set the NodeType of the node's 
* properties.
* @param val a NodeType value to set the node's type. 
*
*@author Marleine Daoud
*/

- type: (NodeType) val;

/**
* A method to get the BorderStyle. A method to get the BorderStyle from the node's 
* properties.
* @return BorderStyle of the node. 
*
*@author Marleine Daoud
*/

- (BorderStyle) lineStyle;

/**
* A method to set the BorderStyle. A method to set the BorderStyle of the node's 
* properties.
* @param val a BorderStyle value to set the node's border line style. 
*
*@author Marleine Daoud
*/

- lineStyle: (BorderStyle) val;

/**
* A method to get the line color of a node. A method to get the line color of 
* a node in ColorRGBA. 
* @return Line color of the node in ColorRGBA. 
*
*@author Marleine Daoud
*/

- (ColorRGBA) lineColor;

/**
* A method to set the line color. A method to set the line color of the node's 
* properties.
* @param valR a float value to set the node's line color red component. 
* @param valG a float value to set the node's line color green component.
* @param valG a float value to set the node's line color blue component.
* @param valA a float value to set the node's line color alpha component.
*
*@author Marleine Daoud
*/

- lineColor: (float) valR: (float) valG: (float) valB: (float) valA;

/**
* A method to get the fill color of a node. A method to get the fill color of 
* a node in ColorRGBA. 
* @return Fill color of the node in ColorRGBA. 
*
*@author Marleine Daoud
*/

- (ColorRGBA) fillColor;

/**
* A method to set the fill color. A method to set the fill color of the node's 
* properties.
* @param valR a float value to set the node's fill color red component. 
* @param valG a float value to set the node's fill color green component.
* @param valG a float value to set the node's fill color blue component.
* @param valA a float value to set the node's fill color alpha component.
*
*@author Marleine Daoud
*/

- fillColor: (float) valR: (float) valG: (float) valB: (float) valA;

/**
* A method to get the comment of a node. A method to get the comment of a node 
* in character array. 
* @return Comment of the node in character array. 
*
*@author Marleine Daoud
*/

- (char *) comment;

/**
* A method to set the comment. A method to set the comment of the node's 
* properties.
* @param val a character array value to set the node's comment. 
*
*@author Marleine Daoud
*/

- comment: (char *) val;

/**
* A method to set the four components of a color. A method to set the for 
* components of a color by taken for float values of the red, green, blue and 
* alpha components of a color and returns a color in ColorRGBA. 
* @param valR a float value to set the red color component. 
* @param valG a float value to set the green color component.
* @param valG a float value to set the blue color component.
* @param valA a float value to set the alpha color component.
* @return Color in ColorRGBA.
*
*@author Marleine Daoud
*/

+ (ColorRGBA *) color: (float) valR: (float) valG: (float) valB: (float) valA;

@end

